home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / cl.vim < prev    next >
Encoding:
Text File  |  2001-05-11  |  3.9 KB  |  106 lines

  1. " Vim syntax file
  2. " Language:    cl ("Clever Language" by Multibase, http://www.mbase.com.au)
  3. " Filename extensions: *.ent, *.eni
  4. " Maintainer:    Philip Uren <philu@system77.com>
  5. " Last update:    Wed May  2 10:30:30 EST 2001
  6.  
  7. " For version 5.x: Clear all syntax items
  8. " For version 6.x: Quit when a syntax file was already loaded
  9. if version < 600
  10.     syntax clear
  11. elseif exists("b:current_syntax")
  12.     finish
  13. endif
  14.  
  15. if version >= 600
  16.     setlocal iskeyword=@,48-57,_,-,
  17. else
  18.     set iskeyword=@,48-57,_,-,
  19. endif
  20.  
  21. syn case ignore
  22.  
  23. syn sync lines=300
  24.  
  25. "If/else/elsif/endif and while/wend mismatch errors
  26. syn match   clifError        "\<wend\>"
  27. syn match   clifError        "\<elsif\>"
  28. syn match   clifError        "\<else\>"
  29. syn match   clifError        "\<endif\>"
  30.  
  31. " If and while regions
  32. syn region clLoop    transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure
  33. syn region clIf        transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>"   contains=ALLBUT,clBreak,clProcedure
  34.  
  35. " Make those TODO notes and debugging stand out!
  36. syn keyword    clTodo            contained    TODO BUG DEBUG FIX
  37. syn keyword clDebug            contained    debug
  38.  
  39. syn match    clComment        "#.*$"        contains=clTodo,clNeedsWork
  40. syn region    clProcedure        oneline        start="^\s*[{}]" end="$"
  41. syn match    clInclude                    "^\s*include\s.*"
  42.  
  43. " We don't put "debug" in the clSetOptions;
  44. " we contain it in clSet so we can make it stand out.
  45. syn keyword clSetOptions    transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim
  46. syn match    clSet            "^\s*set\s.*" contains=clSetOptions,clDebug
  47.  
  48. syn match clPreProc            "^\s*#P.*"
  49.  
  50. syn keyword clConditional    else elsif
  51. syn keyword clWhile            continue endloop
  52. " 'break' needs to be a region so we can sync on it above.
  53. syn region clBreak            oneline start="^\s*break" end="$"
  54.  
  55. syn match clOperator        "[!;|)(:.><+*=-]"
  56.  
  57. syn match clNumber            "\<\d\+\(u\=l\=\|lu\|f\)\>"
  58.  
  59. syn region clString    matchgroup=clQuote    start=+"+ end=+"+    skip=+\\"+
  60. syn region clString matchgroup=clQuote    start=+'+ end=+'+    skip=+\\'+
  61.  
  62. syn keyword clReserved        ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH
  63.  
  64. syn keyword clFunction        asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match
  65.  
  66. syn keyword clStatement        clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do
  67.  
  68. " Define the default highlighting.
  69. " For version 5.7 and earlier: only when not done already
  70. " For version 5.8 and later: only when an item doesn't have highlighting yet
  71. if    version >= 508 || !exists("did_cl_syntax_inits")
  72.     if    version < 508
  73.         let did_cl_syntax_inits = 1
  74.         command -nargs=+ HiLink hi link <args>
  75.     else
  76.         command -nargs=+ HiLink hi def link <args>
  77.     endif
  78.  
  79.     HiLink clifError            Error
  80.     HiLink clWhile                Repeat
  81.     HiLink clConditional        Conditional
  82.     HiLink clDebug                Debug
  83.     HiLink clNeedsWork            Todo
  84.     HiLink clTodo                Todo
  85.     HiLink clComment            Comment
  86.     HiLink clProcedure            Procedure
  87.     HiLink clBreak                Procedure
  88.     HiLink clInclude            Include
  89.     HiLink clSetOption            Statement
  90.     HiLink clSet                Identifier
  91.     HiLink clPreProc            PreProc
  92.     HiLink clOperator            Operator
  93.     HiLink clNumber                Number
  94.     HiLink clString                String
  95.     HiLink clQuote                Delimiter
  96.     HiLink clReserved            Identifier
  97.     HiLink clFunction            Function
  98.     HiLink clStatement            Statement
  99.  
  100.     delcommand HiLink
  101. endif
  102.  
  103. let b:current_syntax = "cl"
  104.  
  105. " vim: ts=4 sw=4
  106.